<layout name='Layout/layout_page' />
<script type="text/javascript">
function jumpUrl(){
  v = document.getElementById("companyID").options[document.getElementById("companyID").selectedIndex].value;
  url="<{:U('Record/index')}>&companyID=" + v;
  window.location.href=url;
}
</script>

	<ol class="breadcrumb">
		<li><a href="<{:U('Record/index')}>">工作记录管理</a></li>
      	<li class="active">列表</li>
    </ol>
	
	<form class="form-inline" method="get" action="index.php">
		<div class="form-group">
    		<label>企业：</label>
    		<select name="companyID" id="companyID" class="form-control input-sm" onchange="jumpUrl()">
				<option value="">全部</option>
				<volist name="company" id="vo">
				<option value='<{$vo['id']}>'><{$vo['name']}></option>
				</volist>
			</select>
			<label>会员编号</label>
    		<input type="text" class="form-control input-sm" name="userid">
    		<button type="submit" class="btn btn-default btn-sm">搜索</button>
			<input type="hidden" name="g" value="Admin" />
			<input type="hidden" name="m" value="Record" />
			<input type="hidden" name="a" value="index" />
  		</div>
	</form>

	<p></p>
	
	<form id="ajaxForm" method="post" action="<{:U('Record/del')}>" name="form1" class="form-horizontal form-validata">
	<TABLE class="table table-striped table-bordered table-hover">
	  <THEAD>
		<tr>
		  <TH><input class="checkall" name="checkall" type="checkbox" id="checkall" onClick="CheckAll(this.form)"/> 全选</TH>
		  <TH>id</TH>
		  <TH>会员编号</TH>
		  <TH>姓名</TH>
		  <TH>电话</TH>
		  <TH>工作职位</TH>
		  <TH>入职日期</TH>
		  <TH>离职日期</TH>
		  <TH>添加日期</TH>
		  <TH>操作</TH>
		</tr>
	  </THEAD>
	  <TBODY>             
			<volist name="list" id="vo">
			<tr>
			  <td><input type="checkbox" name="selectedids[]" value="<{$vo.id}>" id="<{$vo.id}>"></td>
			  <td><{$vo.id}></td>
			  <td><{$vo.userid}></td>
			  <td><{$vo.name}></td>
              <td><{$vo.mobile}></td>
              <td><{$vo.job}>(<{$vo.company}>)</td>
              <td><{$vo.startDate|date='Y-m-d',###}></td>
              <td><eq name="vo.endDate" value="0"><a href="javascript:void(0)" class="btn btn-default btn-sm" onclick="sel('设置离职' , '<{:U('Record/setend',array('id'=>$vo['id']))}>' , 'demo' , 780, 300)">设置离职</a><else/><{$vo.endDate|date='Y-m-d',###}></eq></td>
              <td><{$vo.createTime|date='Y-m-d H:i:s',###}></td>
			  <td>
			  	<a href="<{:U('Record/edit' , array('id'=>$vo['id']))}>" class="btn btn-default btn-sm"><i class="glyphicon glyphicon-edit"></i> 编辑</a>
			  </td>
			</tr>
			</volist>
	  </TBODY>
	</TABLE>

	<div class="row">
		<div class="col-md-6">
			<button class="btn btn-info btn-sm" onClick="if(!confirm('删除后不可恢复！确定吗？'))return false;"><i class="glyphicon glyphicon-trash"></i> 删除选中信息</button>
		</div>
		
		<div class="col-md-6">
			<div class="page">
				<nav>
  					<ul class="pagination"><{$page}></ul>
  				</nav>
  			</div>
		</div>
	</div>
	</form>

<script type="text/javascript">
$("#companyID").val("<{$companyID}>");
</script>

<input type="hidden" id="menu_action" value="user" />